<div class="home-linkuteis">
<?php foreach($this->linkuteis as $linkuteis){ ?>

    <div class="item">
        <a href="<?php echo $linkuteis['LNK_URL']; ?>" target="_blank">
        <?php 
            $img = glob('public/upload/linkuteis/'.$linkuteis['LNK_ID'].'.*');
            if(isset($img[0])){
        ?>
            <img src="<?php echo $this->urlbase.'/'.$img[0]; ?>" />
        <?php } ?>
            <div class="cnt-txt">
                <div class="txt"><?php echo $linkuteis['LNK_NOM']; ?></div>
            </div>
        </a>
    </div>
<?php } ?>
    <a href="<?php echo $this->baseUrl($this->modulo.'/linkuteis'); ?>" class="maislinkuteis">mais links úteis</a>
</div>

<h2><span class="icn_mural"></span> Mural de Mensagens</h2>
<ul class="lista-mural-recados">
    <?php foreach($this->mural as $mural){ 
        $style = $mural['MRM_STA'] == 1 ? 'opt':'';
    ?>
    <li itemid="<?php echo $mural['MRM_ID']?>">
        <div class="col-data dt_<?php echo $mural['MRM_ID']?>">
            <?php if($mural['MRM_STA'] == 1) { ?>
            <span class="n-lido">não lido</span>
            <?php } else if($mural['MRM_STA'] == 2) { ?>
            <span class="lido">lido</span>
            <?php } ?>
        </div>
        <div class="col-txt">
            <div class="data-nome">
                <?php echo substr($mural['MRM_DAT'],8,2).'/'.substr($mural['MRM_DAT'],5,2);?> às <?php echo substr($mural['MRM_HOR'],1,4);?>h | <?php echo $mural['USU_NOME']; ?>
                | <a href="javascript:void(0)" class="ver-mais <?php echo $style;?>" itemid="<?php echo $mural['MRM_ID']; ?>" >Ver mensagem</a>
            </div>
            <p><?php echo $mural['MRM_ASS'];?></p> 
            <p class="msg-txt"><?php echo $mural['MRM_TXT'];?></p> 
        </div>
    </li>
    <?php } ?> 
</ul>

<?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>

<link rel="stylesheet" href="<?php echo $this->urlbase.'/public/media/css/hint.min.css' ?>" />

<div class="sidebar">
    <div class="cnt-calendario">
        <div class="titulo"><?php echo ucfirst(Datetools::texto_Mes(date('m'))); ?></div>
        <div class="mes"></div>
        <div class="calendario">
            <?php echo Calendario::buscaCalendarioEad('','',$this->dia); ?> 
        </div>
    </div>
    <div class="lista-agenda">
        <ul>
        <?php foreach($this->horarios as $hor){ ?>
            <li><?php echo $hor; ?></li>
        <?php } ?>
        </ul>
    </div>
    
    <div class="cnt-box-list">
        <h2><span class="icn_mural"></span> Próximos Vestibulares</h2>
        <ul>
        <?php 
            foreach($this->ves as $c){   
                $count++;
                if( $c['DIA'] < 10) $c['DIA'] = "0".$c['DIA'];
        ?>
            <li><strong><?php echo $c['DIA'].'/'.$c['MES'];?></strong> | <?php echo $c['CAL_NOM'];?>.</li>
        <?php } ?>
        </ul>
    </div>
    
</div>


